<!--
# infoScoop Calendar
# Copyright (C) 2010 Beacon IT Inc.
# 
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>.
-->

<!DOCTYPE HTML>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title></title>
	<style>
		<!--
		body {
			padding:0px;
			margin:0px;
			overflow:hidden;
		}
		a:link, a:visited{
			text-decoration:none;
			border:0px;
			color:black;
		}
		img{
			border:none;
			vertical-align: bottom;
		}
		#msgbar {
			top:0px;
			left:0px;
			width:100%;
			overflow: auto;
			overflow-x:hidden;
			overflow-y:auto;
		}
		#msgbar > div {
			word-break: break-all;
		}
		#version {
			border:1px solid #cccccc;
			background-color: #EDECE2;
			color:black;
			text-align:right;
			font-size: smaller;
			font-family: monospace
		}
		-->
	</style>
  </head>
  <body>
  	<table width="100%" height="100%">
  		<tr id="header">
  			<td>
				<table width="100%" style="border-bottom:1px solid #cccccc;background-color:#EDECE2">
					<tr>
						<td><a href="javascript:window.opener.msg_render();"><img id="allImg"/><span id="all"></span></a></td>
						<td style="border-left:solid 1px #cccccc;"><a href="javascript:window.opener.msg_render(4);"><img id="errorImg"/><span id="error"></span></a></td>
						<td style="border-left:solid 1px #cccccc;"><a href="javascript:window.opener.msg_render(3);"><img id="warnImg"/><span id="warn"></span></a></td>
						<td style="border-left:solid 1px #cccccc;"><a href="javascript:window.opener.msg_render(2);"><img id="infoImg"/><span id="info"></span></a></td>
						<td style="border-left:solid 1px #cccccc;"><a href="javascript:window.opener.msg_render(1);"><img id="debugImg"/><span id="debug"></span></a></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td height="100%;vertical-align:top;">
				<div style="width:100%;height:100%;">
			    	<div id="msgbar"></div>
				</div>
			</td>
		</tr>
		<tr id="footer">
			<td>
		    	<div id="version">@PRODUCT.NAME@ version @BUILD.VERSION@</div>
	    	</td>
	    </tr>
    </table>
  </body>
	<script type="text/javascript">
		<!--
		var IS_R = window.opener.IS_R;
		var imageURL = window.opener.imageURL;
		function $(id){
			return document.getElementById(id);
		} 
		
		document.title = IS_R.msg_title;
		$("all").innerHTML = IS_R.lb_all;
		$("error").innerHTML = IS_R.lb_error;
		$("warn").innerHTML = IS_R.lb_warn;
		$("info").innerHTML = IS_R.lb_info;
		$("debug").innerHTML = IS_R.lb_debug;
		
		$("allImg").src = imageURL + "application_osx_terminal.png";
		$("errorImg").src = imageURL + "error.png";
		$("warnImg").src = imageURL + "warning.png";
		$("infoImg").src = imageURL + "information.png";
		$("debugImg").src = imageURL + "debug.png";
		
		function adjustHeight() {
			var headerHeight = parseInt($("header").offsetHeight);
			var footerHeight = parseInt($("footer").offsetHeight);
			var innerHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0);
			var bodyHeight = (innerHeight - (headerHeight + footerHeight)) - 7;
			if(bodyHeight < 1) return;
			$("msgbar").style.height = bodyHeight + "px";
		}
		
		window.onload = function(){
			adjustHeight();
			window.opener.msg_render(null);
		}
		window.onresize = adjustHeight;
		-->
	</script>
</html>
